'use strict'

let koa = require('koa');
let temp = require('./temp');

// 实例化App,相当于web服务器
let app = new koa();

app.use(async(ctx,next)=>{
    //ctx.body = nunjucks.render('index.html')
    ctx.body=temp('敦煌','<h1>莫高窟</h1><script>alert("alter")</script>')
})

// 端口监听
app.listen(5030);

console.log("http://127.0.0.1:5030");


// ctx.body=temp('敦煌','<h1>莫高窟</h1><script>alert("alter")</script>')
